app_name = "com.ss.android.ugc.aweme"
activity_name = "com.ss.android.ugc.aweme.splash.SplashActivity"

start_app = f"am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -n {app_name}/{activity_name}"

stop_app = f"am force-stop {app_name}"

METHOD_MAP = {
    "waitForExists": [{'mask': 2097152, 'childOrSibling': [], 'childOrSiblingSelector': []}, 20000],
    "objInfo": [{'mask': 2097152, 'childOrSibling': [], 'childOrSiblingSelector': []}],
    "click": [],
    "getText": [{'mask': 2097152, 'childOrSibling': [], 'childOrSiblingSelector': []}]

}

# 我 - 按钮
me = {"className": "android.widget.TextView", "description": "我，按钮"}
douyin_number = '//android.widget.TextView[contains(@text, "抖音号")]'
douyin_name = '//*[@resource-id="com.ss.android.ugc.aweme:id/scroll_layout"]/android.view.ViewGroup/android.widget.LinearLayout/android.view.ViewGroup/android.widget.TextView' # [3]/android.view.ViewGroup/android.widget.TextView
index_page = {"className": "android.widget.TextView", "text": "首页"}
skip = {"text": "跳过广告"}

# 主播直播间名称
room_name = "//android.widget.LinearLayout/android.widget.LinearLayout/android.view.ViewGroup/android.widget.TextView"

# 直播间关注按钮
room_care = {"className": "android.widget.TextView", "text": "关注"}

# 评论信息的元素定位
text_ele = {
    "one_edit_input": {"className": "android.widget.EditText", "text": "说点什么...", },
    "two_view_input": {"className": "android.widget.TextView", "text": "说点什么..."},
    "send_btn": {"className": "android.widget.TextView", "text": "发送"},
}

# 礼物的元素定位
gift_ele = {
    "gift_icon": {"className": "android.widget.Button", "description": "礼物"},
    "gift_logo": {"className": "android.widget.TextView", "text": "礼物"},
    "gift_window": '//*[@resource-id="com.ss.android.ugc.aweme:id/recycler_view"]',
    "all_gift_btn": '//*[@resource-id="com.ss.android.ugc.aweme:id/recycler_view"]/android.widget.Button',
    "gift_name_btn": '//*[@resource-id="com.ss.android.ugc.aweme:id/recycler_view"]/android.widget.Button[contains(@content-desc, "{}")]',
}